﻿@page "/"

@using Licenser.Services

@inject IDialogService DialogService;
@inject NavigationManager NavigationManager;
@inject DataSourceService DataSourceService;

<div class="h-full w-full flex flex-col bg-gray-100">
    <div class="flex items-center space-x-2 bg-primary text-white h-12 pl-6 text-lg font-bold">
        <span class="flex-1 w-0">许可证管理</span>
        <div class="px-4 flex items-center" @onclick="(e) => OpenNew()">
            <FluentIcon Value="@(new Icons.Filled.Size28.Add())" Color="@Color.Lightweight" />
        </div>
    </div>

    <div class="flex-1 h-0 flex flex-col overflow-y-auto">
        @foreach (var app in KeyApps)
        {
            <div class="w-full pt-1">
                <div class="w-full px-6 pt-4 pb-1 bg-white relative" @onclick="(e)=>OpenEdit(app)">
                    <p class="text-lg font-bold"> @(app.Name)</p>
                    <p class="text-sm opacity-80">@(app.Secret)</p>
                </div>
            </div>
        }
    </div>
</div>
